package com.reader.api.entity.comment;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.reader.core.validator.group.AddGroup;
import com.reader.core.validator.group.UpdateGroup;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
*
* @@description 
* @author        jiahaikun
* @date          2018-11-09
*/
@TableName("reader_comment")
public class ReaderComment extends Model<ReaderComment> {

private static final long serialVersionUID = 1L;





private Integer id;

/**
* 关联id，所有有相关评论的ID
*/

@TableField("doc_id")
@NotBlank(message="杂志内容ID不能为空", groups = {AddGroup.class, UpdateGroup.class})
private String docId;

/**
* 评论内容
*/

@NotBlank(message="留言内容不能为空", groups = {AddGroup.class, UpdateGroup.class})
private String comment;

/**
* 留言是否置顶,1置顶,0不置顶
*/

@TableField("is_to_top")

private Integer isToTop;

/**
* 关联APP用户表
*/

@TableField("app_user_id")

private Integer appUserId;



private Integer enable;


@TableField("del_flag")

private Integer delFlag;


@TableField("insert_dt")

@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date insertDt;


public Integer getId() {
return id;
}

public void setId(Integer id) {
this.id = id;
}

public String getDocId() {
return docId;
}

public void setDocId(String docId) {
this.docId = docId;
}

public String getComment() {
return comment;
}

public void setComment(String comment) {
this.comment = comment;
}

public Integer getIsToTop() {
return isToTop;
}

public void setIsToTop(Integer isToTop) {
this.isToTop = isToTop;
}

public Integer getAppUserId() {
return appUserId;
}

public void setAppUserId(Integer appUserId) {
this.appUserId = appUserId;
}

public Integer getEnable() {
return enable;
}

public void setEnable(Integer enable) {
this.enable = enable;
}

public Integer getDelFlag() {
return delFlag;
}

public void setDelFlag(Integer delFlag) {
this.delFlag = delFlag;
}

public Date getInsertDt() {
return insertDt;
}

public void setInsertDt(Date insertDt) {
this.insertDt = insertDt;
}

@Override
protected Serializable pkVal() {
return this.id;
}

@Override
public String toString() {
return "ReaderComment{" +
	", id=" + id +
	", docId=" + docId +
	", comment=" + comment +
	", isToTop=" + isToTop +
	", appUserId=" + appUserId +
	", enable=" + enable +
	", delFlag=" + delFlag +
	", insertDt=" + insertDt +
"}";
}
}